package com.hh.redis;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Service
public class RedisDaoImpl implements RedisDao {
	
	@Autowired
	RedisTemplate redis;
	
	
	public void set(String key,Object val) {
		 redis.boundValueOps(key).set(val);
		 
	}
	
	public Object get(String key) {
		 return redis.boundValueOps(key).get();
	}

}
